/**
 * Created by huotaol on 2017/4/21.
 */
import * as types from "../../constant/ActionType";

export const setLoadingState = (loading, text) => {
    return {type: types.LOADING_MODAL, loading: loading, text: text};
};


export const setSelectArea = (area) => {
    return {
        type: types.SELECTED_AREA,
        id: area.id,
        name: area.name,
        code: area.code,
    };
};

export function requestAreaList() {
    return {
        type: types.AREA_REQUEST,
    };
}

export function receiveAreaList(data) {
    return {
        type: types.AREA_RECEIVE,
        data,
    };
}

export function hotCarList(data = []) {
    return {
        type: types.HOT_CAR_LIST,
        data,
    };
}